package com.joysuch.wwyt.bp.enums;

/**
 * @Author ZhangDong
 * @Date 2020/12/2 11:42
 */
public enum SafeTableSourceTypes {

    HIDDEN_STORE(0, "隐患库"),
    CONTROL_ACTION(1, "管控措施"),
    TEMPLATE_IN(2, "模板导入");

    private Integer index;
    private String type;

    SafeTableSourceTypes(Integer index, String type) {
        this.index = index;
        this.type = type;
    }

    public Integer getIndex() {
        return index;
    }

    public String getType() {
        return type;
    }

    public static String getType(Integer index) {
        SafeTableSourceTypes[] values = SafeTableSourceTypes.values();
        for (SafeTableSourceTypes value : values) {
            if (value.index.equals(index)) {
                return value.type;
            }
        }
        return null;
    }

}
